/**
 * Created by Administrator on 15-10-20.
 */
var Core = require("./modules/core.js");
var core = new Core();
var CheckFast = require("./modules/check.fast.js");
var checkFast = null;
var CheckNormal = require("./modules/check.normal.js");
var checkNormal = null;
var CheckOrderlist = require("./modules/check.orderlist.js");
var checkOrderlist = null;
var Main = RichBase.extend({
	EVENTS : {
		"click" : {
			"#tabUl .tabLi" : "onTabLiClick",
			"#fastTermBtn" : "onFastTermBtnClick",
			"#termSearBtn" : "onTermSearBtnClick",
			"#overdueTermBtn" : "onOverdueTermBtnClick"
		}
	},
	init : function(){
		checkFast = new CheckFast();
		checkNormal = new CheckNormal();
		checkOrderlist = new CheckOrderlist();
	},
	onTabLiClick : function(that,e){
		var tarTab = $(e.currentTarget);
		var type = tarTab.attr("data-type");
		var tabCon = $("#tabMainCon").children("."+type);
		if(tarTab.hasClass("active")) return false;
		tarTab.addClass("active").siblings().removeClass("active");
		tabCon.addClass("active").siblings().removeClass("active");
	},
	//点击 快速验证
	onFastTermBtnClick : function(that,e){
		checkFast.check();
	},
	//点击 改单验证
	onTermSearBtnClick : function(that,e){
		checkNormal.check();
	},
	//点击 已过期订单验证
	onOverdueTermBtnClick : function(that,e){

	}
});

$(function(){ new Main();})


